//
//  ZCScanFootView.m
//  zctx
//
//  Created by apple on 16/3/23.
//  Copyright © 2016年 sanliang. All rights reserved.
//

#import "ZCScanFootView.h"

@implementation ZCScanFootView

-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self addOtherView];
    }
    return self;
}

-(void)addOtherView{
    
    self.backgroundColor = [UIColor colorWithHexString:@"#fafcfb"];
    [self addSubview:self.redImg];
    [self.redImg makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.top).with.offset(145);
        make.centerX.equalTo (self.centerX).with.offset(0);
        make.height.mas_equalTo(100);
        make.width.mas_equalTo(100);
    }];
    [self.redImg setImage:[UIImage imageNamed:@"scan_more_no"]];
    
    [self addSubview:self.redLable];
    [self.redLable makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.redImg.bottom).with.offset(24);
        make.centerX.equalTo (self.centerX).with.offset(0);
        make.height.mas_equalTo(21);
        make.width.mas_equalTo(SCREEN_WIDTH-20);
    }];
    self.redLable.textAlignment = NSTextAlignmentCenter;
    self.redLable.text = @"暂无相关内容";
    self.redLable.textColor = [UIColor colorWithHexString:@"#d2d2d2"];
    self.redLable.font = [UIFont systemFontOfSize:16];
}

-(UIImageView *)redImg{
    if (!_redImg) {
        _redImg = [[UIImageView alloc]init];
    }
    return _redImg;
}

-(UILabel *)redLable{
    if (!_redLable) {
        _redLable = [[UILabel alloc]init];
    }
    return _redLable;
}
@end
